Goto

Collaborating Authors

 memory format


A Study on Inference Latency for Vision Transformers on Mobile Devices

arXiv.org Artificial Intelligence

Given the significant advances in machine learning techniques on mobile devices, particularly in the domain of computer vision, in this work we quantitatively study the performance characteristics of 190 real-world vision transformers (ViTs) on mobile devices. Through a comparison with 102 real-world convolutional neural networks (CNNs), we provide insights into the factors that influence the latency of ViT architectures on mobile devices. Based on these insights, we develop a dataset including measured latencies of 1000 synthetic ViTs with representative building blocks and state-of-the-art architectures from two machine learning frameworks and six mobile platforms. Using this dataset, we show that inference latency of new ViTs can be predicted with sufficient accuracy for real-world applications.


$\text{Memory}^3$: Language Modeling with Explicit Memory

arXiv.org Artificial Intelligence

The training and inference of large language models (LLMs) are together a costly process that transports knowledge from raw data to meaningful computation. Inspired by the memory hierarchy of the human brain, we reduce this cost by equipping LLMs with explicit memory, a memory format cheaper than model parameters and text retrieval-augmented generation (RAG). Conceptually, with most of its knowledge externalized to explicit memories, the LLM can enjoy a smaller parameter size, training cost, and inference cost, all proportional to the amount of remaining "abstract knowledge". As a preliminary proof of concept, we train from scratch a 2.4B LLM, which achieves better performance than much larger LLMs as well as RAG models, and maintains higher decoding speed than RAG. The model is named $\text{Memory}^3$, since explicit memory is the third form of memory in LLMs after implicit memory (model parameters) and working memory (context key-values). We introduce a memory circuitry theory to support the externalization of knowledge, and present novel techniques including a memory sparsification mechanism that makes storage tractable and a two-stage pretraining scheme that facilitates memory formation.


PyTorch 1.5 Released: New APIs, Updated C Frontend and More - Synced

#artificialintelligence

The PyTorch Team yesterday announced the release of PyTorch 1.5, along with new and updated libraries. The release features several major new API additions and improvements, including a significant update to the C frontend, Channel Last memory format for computer vision models, and a stable release of the distributed RPC framework used for model-parallel training. The C frontend API is now at parity with Python with appropriate documentation, and features previously tagged as experimental have been moved to stable versions. C optimizers now also behave identically to those in the Python API. The team has also released an experimental Channel Last memory format for computer vision models, which unlocks the ability to use performance efficient convolution algorithms and hardware such as Nvidia's Tensor Cores and FBGEMM.